//
//  EatTableViewCell.m
//  Tour
//
//  Created by 才诗琦 on 16/3/10.
//  Copyright © 2016年 张中烨. All rights reserved.
//

#import "EatTableViewCell.h"

@implementation EatTableViewCell
#pragma mark - 初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 照片
        self.photo = [[UIImageView alloc]init];
        self.photo.layer.cornerRadius = 5;
        self.photo.clipsToBounds = YES;
        [self.contentView addSubview:_photo];
        _photo.backgroundColor = [UIColor redColor];
        
        // 中文名称
        self.cnname = [[UILabel alloc]init];
        [self.contentView addSubview:_cnname];
        _cnname.font= [UIFont systemFontOfSize:18];
        _cnname.numberOfLines = 3;

        _cnname.textColor = [UIColor blackColor];
        
        // 英文名字
        self.enname = [[UILabel alloc]init];
        [self.contentView addSubview:_enname];
        _enname.font = [UIFont systemFontOfSize:15];
        _enname.textColor = [UIColor blackColor];
        
    }
    return self;
}

#pragma mark - 布局
- (void)layoutSubviews
{
    
    [super layoutSubviews];
  
    
    _photo.frame = CGRectMake(15, 0, 100, 100);
    _cnname.frame = CGRectMake(125, 0, self.contentView.frame.size.width - 140, 60);
    //    _cnname.center = CGPointMake(_photo.center.x, _photo.center.y - 25);
    _enname.frame = CGRectMake(125, 0, self.contentView.frame.size.width - 140, 30);
    //    _enname.center = CGPointMake(_photo.center.x , _photo.center.y );
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
